home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 475 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: sn.no!usenet
  2. From: christod@sn.no (Christopher Dyken)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: RND
  5. Date: 8 Jan 1996 12:44:33 GMT
  6. Organization: SN Internett
  7. Message-ID: <865.6580T940T1920@sn.no>
  8. References: <709.6578T1027T1962@login.eunet.no> <4ck589$g07@maureen.teleport.com> <805.6579T728T2994@login.eunet.no>
  9. NNTP-Posting-Host: sinsen.sn.no
  10. X-Newsreader: THOR 2.2 (Amiga;TCP/IP)
  11.  
  12. >>Patrick Hanevold (patrick.hanevold@login.eunet.no) wrote:
  13.  
  14. >> I found this to be random enought for me :)
  15.  
  16. >> MACRO RND
  17. >>       add.l   d1,d0   ;d0 = 'random'
  18. >>       swap    d0
  19. >>       add.l   d0,d1   ;d1 = 'random'
  20. >> ENDM
  21.  
  22. >>; INPUT:       A0.L = pointer to the RND structure
  23. >>;              D0.L = rnd value 1
  24. >>;              D1.L = rnd value 2
  25. >>Random:
  26. >>       ml      (a0)+,d0
  27. >>       ml      (a0),d1
  28. >>       RND
  29. >>       ml      d1,(a0)
  30. >>       ml      d0,-(a0)
  31. >>       rts
  32. >> It look lame but in my effects I work fine (I use it for stuff like
  33. >> pixelize wipe, fire effects, random object placement etc..)
  34. >Works fine? Try it on some fractal landscapes. You will get a pattern.
  35.  
  36. So what? If it looks adequate, what's the point of wasting more cycles?
  37.  
  38. --
  39.  Christopher Dyken (christod@sn.no | http://www.sn.no/~christod)
  40.  LoungeBar Development
  41.  
  42.